<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">
        <title> - 后台管理系统 - </title>
        <meta name="keywords" content="H+">
        <meta name="description" content="H+">
        <link rel="shortcut icon" href="favicon.ico"> 
        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/css/font-awesome.min.css" rel="stylesheet">
        <!-- <link href="/static/css/animate.css" rel="stylesheet"> -->
        <link href="/static/css/style.css" rel="stylesheet">
        <link href="/static/css/plugins/switchery/switchery.css" rel="stylesheet">
        <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
        <script src="/static/js/jquery.min.js"></script>
        <script src="/static/layer/layer.js"></script>
        <script src="/static/js/bootstrap.min.js"></script>
        <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
        <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
        <script src="/static/js/plugins/layer/layer.min.js"></script>
        <script src="/static/js/plugins/layer/laydate/laydate.js"></script>
        <script src="/static/js/plugins/switchery/switchery.js"></script>
        <script src="/static/js/hplus.js"></script>
        <script type="text/javascript" src="/static/js/contabs.js"></script>
        <!-- <script src="/static/js/plugins/dataTables/jquery.dataTables.js"></script>
        <script src="/static/js/plugins/dataTables/dataTables.bootstrap.js"></script> -->
        <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
        <style>
            .col-sm-on{
                padding-left:0px;
            }
            .col-sm-auto{
                width:auto
            }
            .col-sm-botton{
                width:34px ;padding: 0;margin-right:5px;
            }
        </style>
        {block name="style"}{/block}
    </head>
    <body  class="fixed-sidebar full-height-layout gray-bg" >
    {block name="content"}{/block}
    {block name="script"}{/block}
    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
   var elemsSwitchList = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
   elemsSwitchList.forEach(function (elem) {
       var switchery = new Switchery(elem, {color: '#1AB394',});
       elem.onchange = function () {
           var id = $(this).attr("data-id");
           var type = $(this).attr("data-type");
           var url = $(this).attr("data-url");
           $.post(url,{mid:id,type:type},function(result){
               parent.layer.msg(result['msg']);
               if(result.code != 1){
                   if(result.url != ''){
                    setTimeout(function() {
                       window.location.href = result.url;
                   }, 1000)
                   }
                   setTimeout(function() {
                       switchery.element.checked = !elem.checked;
                       switchery.setPosition();
                   }, 500)
               }
           })
       }
   });
    </script>
 </body>
 </html>

















